/**
 * @Description:
 * @Author: IA ia@kepro.space
 * @Date: 2025-02-21 01:12:57
 */

import type { App } from "vue"
import { app } from '../../main'
interface Use {
  install: (app: App, ...options: any[]) => void;
}

const installList = new Set()

export function myUse<T extends Use>(plugin: T, ...options: any[]) {
  if (installList.has(plugin)) {
    console.error('插件已被注册： ', plugin);
  } else {
    plugin.install(app, ...options)
    installList.add(plugin)
  }

}
